//
//  GuessYouLikeCollectionViewCell.m
//  A段项目,漫画
//
//  Created by dllo on 15/4/22.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "GuessYouLikeCollectionViewCell.h"
#define WIDTH self.contentView.frame.size.width
#define HEIGHT self.contentView.frame.size.height
@implementation GuessYouLikeCollectionViewCell
-(instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        
        
        self.GuessImage = [[UIImageView alloc] init];
        [self.contentView addSubview:self.GuessImage];
        [self.GuessImage release];
        self.GuessImage.layer.masksToBounds = YES;
        self.GuessImage.layer.borderWidth = 1;
        self.GuessImage.layer.cornerRadius = 15;
        self.GuessImage.layer.borderColor = [UIColor clearColor].CGColor;
        
        self.imageLabel = [[UILabel alloc] init];
        [self.contentView addSubview:self.imageLabel];
        [self.imageLabel release];
    }
    return self;
}

-(void)layoutSubviews{
    [super layoutSubviews];
    self.GuessImage.frame = CGRectMake(0, 0, WIDTH, HEIGHT - 30);
    self.GuessImage.backgroundColor = [UIColor yellowColor];
    self.imageLabel.numberOfLines = 0;
    [self.imageLabel sizeToFit];
    self.imageLabel.font = [UIFont systemFontOfSize:14];
    self.imageLabel.textAlignment = NSTextAlignmentCenter;
    self.imageLabel.frame = CGRectMake(0, HEIGHT - 30, WIDTH, 30);
}
@end
